package com.centerm.structure.dto;

import java.util.List;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;

import com.centerm.common.constant.validate.Delete;
import com.centerm.common.constant.validate.Insert;
import com.centerm.common.constant.validate.Update;

public class DepartmentInfo {
	@NotNull(groups = {Update.class,Delete.class})
    private Integer id;

    private Integer parentId;
    
    private String parentName;
    
    @NotBlank(groups = {Insert.class})
    private String name;

    private String likeName;
    
    private String description;

    private Integer valid;
    
    private Integer preId;
    
    private Integer manager;
    
    private String managerName;
    
    private List<UserInfo> memberList;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }

    public Integer getValid() {
        return valid;
    }

    public void setValid(Integer valid) {
        this.valid = valid;
    }

	public Integer getPreId() {
		return preId;
	}

	public void setPreId(Integer preId) {
		this.preId = preId;
	}

	public Integer getManager() {
		return manager;
	}

	public void setManager(Integer manager) {
		this.manager = manager;
	}

	public String getLikeName() {
		return likeName;
	}

	public void setLikeName(String likeName) {
		this.likeName = likeName;
	}

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public String getManagerName() {
        return managerName;
    }

    public void setManagerName(String managerName) {
        this.managerName = managerName;
    }

    public List<UserInfo> getMemberList() {
        return memberList;
    }

    public void setMemberList(List<UserInfo> memberList) {
        this.memberList = memberList;
    }

    @Override
    public String toString() {
        return "DepartmentInfo [id=" + id + ", parentId=" + parentId
                + ", parentName=" + parentName + ", name=" + name
                + ", likeName=" + likeName + ", description=" + description
                + ", valid=" + valid + ", preId=" + preId + ", manager="
                + manager + ", managerName=" + managerName + ", memberList="
                + memberList + "]";
    }
	
}